Skip to content

Set global device back to cpu at the end of tutorial #2411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 2, 2023
Merged

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Jun 2, 2023

We are using sphinx to render those tutorials, which does not start a new process to render, so one needs to restore global state to default value, by calling torch.set_default_device('cpu')

We are using sphinx to render those tutorials, which does not start a new process to render, so one needs to restore global state to default value, by calling `torch.set_default_device('cpu')`
@netlify
Copy link

netlify bot commented Jun 2, 2023

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit 79b13a1
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/647a52f3af661f00081851dc
😎 Deploy Preview https://deploy-preview-2411--pytorch-tutorials-preview.netlify.app/recipes/recipes/changing_default_device
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jun 2, 2023

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit 7ac3bdd
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/647a5c2b97eca800080ea5de
😎 Deploy Preview https://deploy-preview-2411--pytorch-tutorials-preview.netlify.app/recipes/recipes/changing_default_device
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@malfet malfet merged commit fa9be97 into main Jun 2, 2023
@malfet malfet deleted the malfet-patch-1 branch June 2, 2023 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants